/*
    about pointer in function
*/

#include<stdio.h>
#include<stdlib.h>


void change(char *a, char *b) {
    char *t = &a;
    a = &b;
    b = &t;
}

int main(int argc, char const *argv[])
{
    char *c1;
    char *c4;
    char c2 = 'e';
    char c3 = 'r';

    c1 = &c2;
    c4 = &c3;

    printf("c1 = %c, c4 = %c\n", *c1, *c4);

    printf("\nnow change:\n");
    change(&c1, &c4);
    printf("c1 = %c, c4 = %c\n", *c1, *c4);

    // printf("%c", c1);
    return 0;
}
